home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Testing & Debugging / Virtual User tools / vuCollect 1.1 / relMouse.vu next >
Encoding:
Text File  |  1993-09-17  |  685 b   |  32 lines  |  [TEXT/MPS ]

  1. task relMouse (specifier := 1) begin
  2.     if (specifier > 0) 
  3.         begin
  4.             DWindow := match [window o:specifier r:?rect]!;
  5.             if DWindow 
  6.                 begin
  7.                     match [mouse p:?coord];
  8.                     x := coord[1] - rect[1];
  9.                     y := coord[2] - rect[2];
  10.                     println "∂{ {x},{y} ∂}";
  11.                 end;
  12.             else
  13.                 println "Sorry, couldn't find window with ordinality ({specifier}).";
  14.         end;
  15.     else 
  16.         begin
  17.             DWindow := match [window t:specifier r:?rect]!;
  18.             if DWindow 
  19.                 begin
  20.                     match [mouse p:?coord];
  21.                     x := coord[1] - rect[1];
  22.                     y := coord[2] - rect[2];
  23.                     println "∂{ {x},{y} ∂}";
  24.                 end;
  25.             else
  26.                 println "Sorry, couldn't find window with title ∂"{specifier}∂".";
  27.         end;
  28. end;
  29.  
  30.  
  31. relMouse (1);
  32.